﻿using System;
using System.Collections.Generic;
using System.Text;

namespace DataObjectLayer
{
    public class HelpDOL
    {
        public const string Select = @"SELECT HELPID, HELPTITLE,IMAGEURL,FILEURL, DESCRIPTION FROM COMMON.HELP";
        public const string Insert = @"INSERT INTO COMMON.HELP(HELPTITLE,DESCRIPTION,IMAGEURL,FILEURL) VALUES (@HelpTitle,@Description,@ImageURL,@FileURL)";
        public const string SelectComboBox = @"SELECT HELPID, HELPTITLE FROM COMMON.HELP UNION (SELECT VALUE AS HELPID, TEXT AS HELPTITLE FROM COMMON.NOSELECTION)";
        public const string Delete = "DELETE FROM COMMON.HELP WHERE HELPID=@HelpId";
        public const string Update = "UPDATE COMMON.HELP SET HELPTITLE = @HelpTitle ,DESCRIPTION = @Description, IMAGEURL = @ImageURL, FILEURL = @FileURL WHERE HELPID = @HelpId";
        public const string SelectMaxId = "SELECT ISNULL(MAX(HELPID),0)+1 AS MAX_HELP_ID FROM COMMON.HELP";
        public enum QueryStatus { Select,SelectComboBox, Insert, Delete, Update, SelectMaxId };
    }
}
